package com.woniu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 充电站表
 * @TableName charging_station
 */
@TableName(value ="charging_station")
@Data
public class ChargingStation implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 充电站编号
     */
    private String stationNumber;

    /**
     * 充电站名称
     */
    private String stationName;

    /**
     * 充电站类型
     */
    private String stationType;

    /**
     * 电站位置
     */
    private String stationLocation;

    /**
     * 充电站类型id
     */
    private Long stationTypeId;

    /**
     * 电站负责人
     */
    private String stationManager;

    /**
     * 最大充电桩数目
     */
    private Integer maxChargerCount;

    /**
     * 联系电话
     */
    private String phoneNumber;

    /**
     * 运营时间
     */
    private String operatingHours;

    /**
     * 图片
     */
    private String imageUrl;

    /**
     * 简介
     */
    private String description;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 计费规则id
     */
    private Long billingRuleId;

    /**
     * 经度
     */
    private BigDecimal longitude;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ChargingStation other = (ChargingStation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStationNumber() == null ? other.getStationNumber() == null : this.getStationNumber().equals(other.getStationNumber()))
            && (this.getStationType() == null ? other.getStationType() == null : this.getStationType().equals(other.getStationType()))
            && (this.getStationLocation() == null ? other.getStationLocation() == null : this.getStationLocation().equals(other.getStationLocation()))
            && (this.getStationTypeId() == null ? other.getStationTypeId() == null : this.getStationTypeId().equals(other.getStationTypeId()))
            && (this.getStationManager() == null ? other.getStationManager() == null : this.getStationManager().equals(other.getStationManager()))
            && (this.getMaxChargerCount() == null ? other.getMaxChargerCount() == null : this.getMaxChargerCount().equals(other.getMaxChargerCount()))
            && (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()))
            && (this.getOperatingHours() == null ? other.getOperatingHours() == null : this.getOperatingHours().equals(other.getOperatingHours()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getBillingRuleId() == null ? other.getBillingRuleId() == null : this.getBillingRuleId().equals(other.getBillingRuleId()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStationNumber() == null) ? 0 : getStationNumber().hashCode());
        result = prime * result + ((getStationType() == null) ? 0 : getStationType().hashCode());
        result = prime * result + ((getStationLocation() == null) ? 0 : getStationLocation().hashCode());
        result = prime * result + ((getStationTypeId() == null) ? 0 : getStationTypeId().hashCode());
        result = prime * result + ((getStationManager() == null) ? 0 : getStationManager().hashCode());
        result = prime * result + ((getMaxChargerCount() == null) ? 0 : getMaxChargerCount().hashCode());
        result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
        result = prime * result + ((getOperatingHours() == null) ? 0 : getOperatingHours().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getBillingRuleId() == null) ? 0 : getBillingRuleId().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", stationNumber=").append(stationNumber);
        sb.append(", stationType=").append(stationType);
        sb.append(", stationLocation=").append(stationLocation);
        sb.append(", stationTypeId=").append(stationTypeId);
        sb.append(", stationManager=").append(stationManager);
        sb.append(", maxChargerCount=").append(maxChargerCount);
        sb.append(", phoneNumber=").append(phoneNumber);
        sb.append(", operatingHours=").append(operatingHours);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", description=").append(description);
        sb.append(", status=").append(status);
        sb.append(", billingRuleId=").append(billingRuleId);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}